import 'dart:math';

import 'package:flutterroom/pages/home/tab_search/dataList.dart';
import 'package:scoped_model/scoped_model.dart';


class FilterBarModel extends Model{
  List<GeneralType> _roomTypeList=[];
  List<GeneralType> _orientList=[];
  List<GeneralType> _floorList=[];

  Set<String> _selectedList = Set<String>();

  Map<String,List<GeneralType> > get dataList{
    var result =Map<String,List<GeneralType>>();
    result["roomTypeList"] =_roomTypeList;
    result["orientList"] =_orientList;
    result["floorList"] =_floorList;
    return result;
  }
set dataList(Map<String,List<GeneralType>> data){
  _roomTypeList = data["roomTypeList"];
  _orientList = data["orientList"];
  _floorList = data["floorList  "];
  notifyListeners();
}

Set<String> get selectedList{
  return _selectedList;
}

selectedListToggleItem(String data){
  //判断是否包含
  if(_selectedList.contains(data)){
  _selectedList.remove(data);
  }else{
  _selectedList.add(data);
  }
}

}